﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Net.Http;
using System.Web.Http;
using SecurityApi.DataAccess;
using SecurityApi.Business;

namespace SecurityApi.WebApi.Controllers
{
    public class UserApplicationController : ApiController
    {
        public List<SecurityApi.Model.Application> GetByUserName(string userName, int enterpriseId)
        {
            UserApplicationManager mgr = new UserApplicationManager();
            return mgr.GetUserApplications(userName,enterpriseId);
        }

        public List<SecurityApi.Model.Application> GetByUserId(int userId, int enterpriseId)
        {
            UserApplicationManager mgr = new UserApplicationManager();
            return mgr.GetUserApplications(userId, enterpriseId);
        }

    }
}
